//
//  EditFlowLayout.m
//  便签
//
//  Created by  on 2022/9/29.
//

#import "EditFlowLayout.h"

@implementation EditFlowLayout
- (NSArray<__kindof UICollectionViewLayoutAttributes *> *)layoutAttributesForElementsInRect:(CGRect)rect
{
    NSArray *attributes  = [[super layoutAttributesForElementsInRect:rect] copy];
    for (UICollectionViewLayoutAttributes *attr in attributes) {
        CGRect frame = attr.frame;
        if (frame.size.height == 300) {
            CGPoint origin = frame.origin;
            origin.y = origin.y + 20;
//            origin.x = 20;
//            CGSize size = CGSizeMake(SCREEN_WIDTH - 40, 300);
            frame.origin = origin;
//            frame.size = size;
            attr.frame = frame;
        }else{ }
    }
    return  attributes;
}

@end
